package bank;


/**
   This program tests the Bank class.
*/
public class BankTester
{
   public static void main(String[] args)
   {
      Bank firstBankOfJava = new Bank();
      firstBankOfJava.addCheckingAccount(1001, 500);
      firstBankOfJava.addSavingsAccount(1002, 2500, 10);
      firstBankOfJava.addCheckingAccount(1003, 1000);
      firstBankOfJava.addSavingsAccount(1004, 750, 0);
      
      firstBankOfJava.deposit(1001, 250);
      firstBankOfJava.deposit(1001, 300);
      firstBankOfJava.deposit(1001, 50);
      firstBankOfJava.deposit(1001, 5000);
      firstBankOfJava.withdraw(1001, 500);
      firstBankOfJava.withdraw(1001, 500);
      firstBankOfJava.withdraw(1001, 500);
      firstBankOfJava.withdraw(1001, 500);
      firstBankOfJava.withdraw(1001, 500);
      firstBankOfJava.deductFees(1001);
      firstBankOfJava.withdraw(1001, 3596);
      
      firstBankOfJava.deposit(1002, 1500);
      firstBankOfJava.withdraw(1002, 2000);
      firstBankOfJava.withdraw(1002, 500);
      firstBankOfJava.addInterest(1002);
      firstBankOfJava.deposit(1002, 4000);
      
      firstBankOfJava.deposit(1003, 100);
      firstBankOfJava.withdraw(1003, 250);
      firstBankOfJava.deposit(1003, 750);
      
      firstBankOfJava.transfer(1003, 1004, 800);
      
      firstBankOfJava.closeAccount(1001);
      firstBankOfJava.suspendAccount(1002);
      
      System.out.print(firstBankOfJava.accountTransactionsString(1001));
      System.out.print(firstBankOfJava.accountTransactionsString(1002));
      System.out.print(firstBankOfJava.accountTransactionsString(1003));
      System.out.print(firstBankOfJava.accountTransactionsString(1004));
      System.out.print(firstBankOfJava.summarizeAllAccounts());
   }
}
